Skip to content

fix: allow fork PRs to pass validation when commenting fails#15

Merged
danmoseley merged 1 commit intomainfrom
fix/fork-pr-comment-permissions
Mar 24, 2026
Merged

fix: allow fork PRs to pass validation when commenting fails#15
danmoseley merged 1 commit intomainfrom
fix/fork-pr-comment-permissions

Conversation

@lewing
Copy link
Copy Markdown
Member

@lewing lewing commented Mar 24, 2026

Adds continue-on-error: true to the PR comment step. GITHUB_TOKEN is read-only for fork PRs, causing HTTP 403 on the comment POST. Validation results are still reported via job annotations and exit code.

Fixes #13

Add continue-on-error to the PR comment step. GITHUB_TOKEN is
read-only for fork PRs, so the comment POST returns HTTP 403.
Validation results are still reported via job annotations and
exit code — the comment is a nice-to-have, not a gate.

Fixes #13

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 24, 2026 18:28
@github-actions
Copy link
Copy Markdown

Warnings (4)

  • plugins/dotnet-dnceng/skills/ci-analysis — ~2971 tokens (chars/4) — approaching 'comprehensive' range where gains diminish.
  • plugins/dotnet-dnceng/skills/ci-crash-dump — ~3892 tokens (chars/4) — approaching 'comprehensive' range where gains diminish.
  • plugins/dotnet-dnceng/skills/ci-crash-dump — no numbered workflow steps — agents follow sequenced procedures more reliably.
  • plugins/dotnet-dnceng/skills/flow-analysis — ~5442 tokens (chars/4) — 'comprehensive' skills hurt performance. Consider splitting into 2-3 focused skills.

View workflow run

Copy link
Copy Markdown
Member

@danmoseley danmoseley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, don't know why I didn't put PR up

@danmoseley danmoseley merged commit 730d0c5 into main Mar 24, 2026
6 of 7 checks passed
@danmoseley danmoseley deleted the fix/fork-pr-comment-permissions branch March 24, 2026 18:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the pr-validation GitHub Actions workflow so fork-based pull requests don’t fail validation solely due to insufficient GITHUB_TOKEN permissions when attempting to post a PR comment.

Changes:

  • Marks the “Post or update PR comment” step as continue-on-error: true to prevent HTTP 403 comment-post failures from failing the job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- name: Post or update PR comment
if: always() && github.event_name == 'pull_request' && steps.validate.outputs.has_comment == 'true'
continue-on-error: true # GITHUB_TOKEN is read-only for fork PRs (dotnet/arcade-skills#13)
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continue-on-error: true will ignore all failures in the comment step, including same-repo PRs where a failure might indicate a real regression (e.g., API shape changes, auth misconfig, rate limiting). If the intent is only to tolerate fork PR permission restrictions, consider making this conditional (e.g., only for fork PRs) so unexpected failures still fail the job in trusted contexts.

Suggested change
continue-on-error: true # GITHUB_TOKEN is read-only for fork PRs (dotnet/arcade-skills#13)
continue-on-error: ${{ github.event.pull_request.head.repo.fork == true }} # GITHUB_TOKEN is read-only for fork PRs (dotnet/arcade-skills#13)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validate-structure fails on fork PRs due to GITHUB_TOKEN permissions

3 participants